package com.waterfeeds.gproxy.server;

import com.waterfeeds.gproxy.user.DefaultCallback;
import com.waterfeeds.gproxy.user.Properties;

public class ServerApplication {
    public static void main(String[] args) {
        DefaultCallback callback = new DefaultCallback();//new回调函数
        Server server = new Server(callback);//new server对象 将callback封装好的信息,进行处理
        boolean status = server.startServer(Properties.SERVER_ONE_PORT);//构建网关的channel通道
        if (status) {
            server.registerServer(Properties.getZkAddress(), Properties.SPACE, Properties.SERVER_ONE_NAME, Properties.SERVER_ONE_ADDRESS);//在zookpper上注册节点
        }
    }
}


